package www.lagou.app;

import org.junit.Test;
import www.lagou.dao.TransactionDao;
import www.lagou.entity.Transaction;
import www.lagou.utils.DateUtils;

import java.sql.SQLException;

public class TestTransactionDao {

    TransactionDao transactionDao  = new TransactionDao();

    // 测试 ：向 transaction 插入数据
    @Test
    public void testInsert() throws SQLException {

        Transaction transaction = new Transaction();
        transaction.setCardid("123");
        transaction.setTratype("转入");
        transaction.setTramoney(100);

        transaction.setTradate(DateUtils.getDateFormart());

        transactionDao.insert(transaction);

    }
}
